home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C++ / Libraries / grayimage / myenv.cc < prev    next >
Encoding:
Text File  |  1994-06-30  |  1.9 KB  |  50 lines  |  [TEXT/R*ch]

  1. ------------------------------------";
  2.  
  3. const char _Asteriscs [] = "\
  4. *******************************************************************************";
  5.  
  6. const char _Equals [] = "\
  7. ===============================================================================";
  8.  
  9.  
  10. /*
  11.  *------------------------------------------------------------------------
  12.  *            Print an error message at stderr and abort
  13.  * Synopsis
  14.  *    volatile void _error(const char * message,... );
  15.  *    Message may contain format control sequences %x. Items to print 
  16.  *    with the control sequences are to be passed as additional arguments to
  17.  *    the function call.
  18.  */
  19.  
  20. volatile void _error(const char * message,...)
  21. {
  22.   va_list args;
  23.   va_start(args,message);        /* Init 'args' to the beginning of */
  24.                     /* the variable length list of args*/
  25.   fprintf(stderr,"\n_error:\n");     
  26.   vfprintf(stderr,message,args);
  27.   fputs("\n",stderr);
  28.   abort();
  29. }
  30.  
  31.  
  32. /*
  33.  *------------------------------------------------------------------------
  34.  *                    Print a message at stderr
  35.  * Synopsis
  36.  *    void message(const char * text,... );
  37.  *    Message may contain format control sequences %x. Items to print 
  38.  *    with the control sequences are to be passed as additional arguments to
  39.  *    the function call.
  40.  */
  41.  
  42. void message(const char * text,...)
  43. {
  44.   va_list args;
  45.   va_start(args,text);        /* Init 'args' to the beginning of */
  46.                     /* the variable length list of args*/
  47.   vfprintf(stderr,text,args);
  48. }
  49.  
  50.